//
//  UIViewController+Routes.m
//  AFNetworking
//
//  Created by admin on 2020/8/31.
//

#import "UIViewController+Routes.h"
#import <YYKit/YYKit.h>
@implementation UIViewController (Routes)


/*
 * 根据类名跳转
 */
-(void)routepush:(NSString *)key param:(NSDictionary *)param{
    if(!key){
        return;
    }
    Class cls = NSClassFromString(key);
    UIViewController *viewcontroller =  [cls new];
    if (param) {
        [viewcontroller modelSetWithDictionary:param];
    }
    
    [self.navigationController pushViewController:viewcontroller animated:YES];
}
@end
